package com.huai.demo_test1.testSolution;
 
class Thread1 extends Thread{
    @Override
    public void run() {
        for(int i = 0 ; i < 10 ;i++){
            System.out.println("播放音乐"+i);
        }
    }
}
 
public class ThreadTest {
    public static void main(String[] args) {
        for(int i = 0 ; i < 10 ; i++){
            System.out.println("玩游戏"+i);
            if(i==5){
                Thread1 th1 = new Thread1();
                th1.start();
            }
        }
    }
 
}